home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / DVIM72-Mac 1.9.6 / source / DBGOPEN.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-14  |  908 b   |  33 lines  |  [TEXT/R*ch]

  1. /* -*-C-*- dbgopen.h */
  2. /*-->dbgopen*/
  3. /**********************************************************************/
  4. /****************************** dbgopen *******************************/
  5. /**********************************************************************/
  6. #include "dvihead.h"
  7. #include "commands.h"
  8. #include "gendefs.h"
  9. #include "gblprocs.h"
  10. #include "egblvars.h"
  11. #include "m72.h"
  12.  
  13. /* This used to be a long in-line macro, but some compilers could not */
  14. /* handle it. */
  15.  
  16. void
  17. dbgopen(fp, fname, openmode)
  18. FILE* fp;                /* file pointer */
  19. char* fname;                /* file name */
  20. char* openmode;                /* open mode flags */
  21. {
  22.     if (DBGOPT(DBG_OKAY_OPEN) && (fp != (FILE *)NULL))
  23.     {
  24.     (void)printf("%%Open [%s] mode [%s]--[OK]",fname,openmode);
  25.     printf("\n");
  26.     }
  27.     if (DBGOPT(DBG_FAIL_OPEN) && (fp == (FILE *)NULL))
  28.     {
  29.     (void)printf("%%Open [%s] mode [%s]--[FAILED]",fname,openmode);
  30.     printf("\n");
  31.     }
  32. }
  33.